def logging(fn):
    def inner(a,b):
        print('执行日志输出')
        fn(a,b) # 实际执行sum_num函数
    return inner

@logging
def sum_num(num1,num2):
    result = num1 + num2
    print(result)

sum_num(1,2) #在装饰器的底层，相当于调用inner()